<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">
<h:body>

	<ui:composition template="/template/commonLayout.xhtml">

		<ui:define name="content">
			<p:messages id="messages" showDetail="true" autoUpdate="true"
				closable="true" />
			<h4>Time Chart</h4>
			<h:form>
				<p:outputLabel for="intervalsFrom" value="Select Start-Day: " />
				<p:calendar id="intervalsFrom" value="#{timeIntervalView.from_Date}"
					pattern="dd/MM/yyyy" locale="de">
				</p:calendar>

				<p:outputLabel for="intervalsTo" value="Select End-Day: " />
				<p:calendar id="intervalsTo" value="#{timeIntervalView.to_Date}"
					pattern="dd/MM/yyyy" locale="de">
				</p:calendar>
				<p:commandButton value="Show Chart" update="outHourChart"
					actionListener="#{timeIntervalView.getIntervalsByDates}"
					icon="ui-icon-check" />

				<br />
				<br />
				<h:panelGroup id="outHourChart">
					<h:panelGroup rendered="#{timeIntervalView.dataReceived}">
						<p:chart type="line" model="#{timeIntervalView.timeLineModel}" />
					</h:panelGroup>
				</h:panelGroup>
			</h:form>
		</ui:define>
	</ui:composition>

</h:body>

</html>